<?php namespace Modules\Shop\Http\Controllers;


class CaptchaController extends Controller {

    public function getIndex()
    {

        global $_CFG, $ecs, $err, $smarty, $_LANG, $db, $charset;

        $img = new \captcha(ROOT_PATH . 'data/captcha/', $_CFG['captcha_width'], $_CFG['captcha_height']);
        @ob_end_clean(); //清除之前出现的多余输入
        if (is_set(\Input::get('is_login'))) {
            $img->session_word = 'captcha_login';
        }
        $img->generate_image();

        return view('shop::index');
	}
	
}